#include "test_socket.h"
#include "pjlib.h"

void test_socket()
{
    pj_status_t res;
    

    pj_sock_t client;

    pj_sockaddr_in sev_addr;
    pj_str_t server_name = pj_str("localhost");
    pj_sockaddr ip;
    pj_sockaddr_init( pj_AF_INET(), &ip, &server_name, 800 );
    //sev_addr.sin_family = pj_AF_INET();
    //sev_addr.sin_addr

    res = pj_sock_socket( pj_AF_INET(), pj_SOCK_STREAM(),0, &client );

    res = pj_sock_connect( client, &(ip.ipv4), sizeof(sev_addr) );
    if( res == PJ_SUCCESS )
    {
        PJ_LOG(3, ("test_socket", "socket connect success") );
    }

}